<?php
/**
 * The following variables are available in this template:
 * - $this: the CrudCode object
 */
?>
<?php echo "<?php\n"; ?>
/* @var $this <?php echo $this->getControllerClass(); ?> */
/* @var $model <?php echo $this->getModelClass(); ?> */
/* @var $form CActiveForm */
?>
<div id="update_form">
<!-- form start -->

<div class="zyWell">Fields with<span class="required">*</span>are required.</div>

<?php echo "<?php \$form=\$this->beginWidget('CActiveForm', array(
	'id'=>'".$this->class2id($this->modelClass)."-form',
	'enableAjaxValidation'=>false,
)); ?>\n"; ?>
<?php echo "<?php echo \$form->errorSummary(\$model); ?>\n"; ?>

<?php
$i=1;
foreach($this->tableSchema->columns as $column)
{
	if($column->autoIncrement)
		continue;
?>
<?php echo $i%2==1?"\t<div class=\"row-fluid\">\n":'';?>
		<div class="span6">
			<div class="form-row control-group row-fluid">
				<?php echo "<?php echo ".$this->generateActiveLabel($this->modelClass,$column)."; ?>\n"; ?>
					<div class="controls span7">
						<?php echo "<?php echo ".$this->generateActiveField($this->modelClass,$column)."; ?>\n"; ?>
						<?php echo "<?php echo \$form->error(\$model,'{$column->name}'); ?>\n"; ?>
					</div>
			</div>
		</div>
<?php echo $i%2==0?"\t</div>\n":'';?>
<?php
$i++;
}
?>
<div class="form-actions row-fluid">
	<div class="span7 offset3">
		<?php echo "<?php echo CHtml::submitButton(\$model->isNewRecord ? Yii::t(\"common\",\"Create\") : Yii::t(\"common\",\"Save\"),array('class'=>'btn btn-large btn-block')); ?>\n"; ?>
	</div>
</div>
<?php echo "<?php \$this->endWidget(); ?>\n"; ?>
</div>
<!-- form -->